package tc.maas.eikotrade.dataaccess.items;

import java.util.ArrayList;
import java.util.List;

import tc.maas.eikotrade.dataaccess.Storable;
import tc.maas.eikotrade.dataaccess.transactions.Transaction;

public abstract class Party implements Storable {
	
	protected final Long id;
	protected String name;
	protected final List<Transaction> transactions = new ArrayList<Transaction>();
	
	protected Party(Long id, String name) {
		this.id = id;
		this.name = name;
	}

	public Long getId() {
		return id;
	}
	
	public List<Transaction> getTransactions() {
		return transactions;
	}
	
	public void addTransaction(Transaction transaction) {
		transactions.add(transaction);
	}

}
